#####
# Makefile for compile postgresql chinese segment function
# Jing Xu <rainx1982@gmail.com>
#####
CC		= gcc
CFLAG   = -fpic -fPIC -shared
OPT     = -g 
LINC    = -I/usr/include/ -I/usr/include/scws -I. \
		  -I`/usr/local/pgsql/bin/pg_config --includedir-server`
LDLIBS  = -L/usr/lib/ -L/usr/local/lib/ 

all: libsolor_zhseg.so

libsolor_zhseg.so : solor_zhseg.c
	$(CC) -o libsolor_zhseg.so $(CFLAG) $(OPT) $(LINC) $(LDLIBS) solor_zhseg.c  /usr/local/lib/libscws.a

install: libsolor_zhseg.so
	sudo cp libsolor_zhseg.so /home/solor/lib/

installdict:
	sudo cp dict/* /home/solor/conf/scws/

clean : libsolor_zhseg.so
	rm libsolor_zhseg.so
